<script th:src="@{/scripts/user/edit.js}"></script>
<form id="saveForm" method="post">
    <input type="hidden" name="id" id="id" th:value="${user.id}"/>
    <input type="hidden" name="password" id="password" th:value="${user.password}"/>
    <input type="hidden" name="merchantid" id="merchantid" th:value="${user.merchant.id}"/>
<div class="addInfBtn" >
    <h3 class="itemTit"><span>用户信息</span></h3>
    <table class="addNewInfList">
        <tr>
            <th>名称</th>
            <td width="240">
                <input class="inp-list w-200 clear-mr f-left" type="text" th:value="${user.name}" id="name" name="name" maxlength="16" />
                <span class="tipStar f-left">*</span>
            </td>
            <th>邮箱</th>
            <td>
                <input class="inp-list w-200 clear-mr f-left" type="text"  th:value="${user.email}" id="email" name="email"  maxlength="120" />
                <span class="tipStar f-left">*</span>
            </td>
        </tr>

        <tr>
            <th>角色</th>
            <td width="240">
                <div >
                    <select name="rls" id="rls" multiple="multiple">
                        <option th:each="role:${roles}" th:value="${role.id}"
                                th:text="${#strings.length(role.name)>20?#strings.substring(role.name,0,20)+'...':role.name}"
                                th:selected="${#lists.contains(rids, role.id)}"
                                ></option>
                    </select>
                </div>
            </td>
            <th>日期</th>
            <td>
                <input  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" type="text" class="inp-list w-200 clear-mr f-left" th:value="${user.created} ? ${#dates.format(user.created,'yyyy-MM-dd HH:mm:ss')} :''" id="created" name="created"/>
            </td>
        </tr>
        <tr>
            <th>性别</th>
            <td>
                <div class="selectDownMode f-left w-206">
                    <input type="text" th:if="${user.sex==0}" th:value="男"/>
                    <input type="text" th:if="${user.sex==1}" th:value="女"/>
                    <input type="text" th:if="${user.sex==null}" th:value="请选择"/>
                    <select class="selectMode" name="sex">
                        <option value="">请选择</option>
                        <option value="0" th:selected="${user.sex==0}">男</option>
                        <option value="1" th:selected="${user.sex==1}">女</option>
                    </select>
                </div>
            </td>
        </tr>
    </table>
    <div class="bottomBtnBox">
        <a class="btn-93X38 saveBtn" href="javascript:void(0)">确定</a>
        <a class="btn-93X38 backBtn" href="javascript:closeDialog(0)">返回</a>
    </div>
</div>

</form>